package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.HisDepts;
import com.ruoyi.system.mapper.HisDeptsMapper;
import com.ruoyi.system.service.IHisDeptsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Admin
 * @title: IHisDeptsServiceImpl
 * @projectName RuoYi-Vue-master
 * @description: IHisDeptsServiceImpl
 * @date 2025/4/13 13:50
 */
@Service
public class IHisDeptsServiceImpl implements IHisDeptsService {
    @Autowired
    private HisDeptsMapper hisDeptsMapper;

    @Override
    public List<HisDepts> selectDeptsList(HisDepts hisDepts) {
        return hisDeptsMapper.selectHisDeptsList(hisDepts);
    }

    @Override
    public int deleteDeptsById(Long deptsId) {
        return hisDeptsMapper.deleteHisDeptsById(deptsId);
    }

    /**
     * 科室新增
     * @param hisDepts
     * @return
     */
    @Override
    public int insertHisDepts(HisDepts hisDepts) {
        return hisDeptsMapper.insertHisDepts(hisDepts);
    }

    @Override
    public HisDepts selectHisDeptsById(Long deptsId) {
        return hisDeptsMapper.selectHisDeptsById(deptsId);
    }

    @Override
    public int updateHisDepts(HisDepts hisDepts) {
        return hisDeptsMapper.updateHisDepts(hisDepts);
    }

    @Override
    public int deleteDeptsByIds(Long[] deptsIds) {
        return hisDeptsMapper.deleteDeptsByIds(deptsIds);
    }
}
